/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DAO;
import java.util.ArrayList;
import DTO.CTDONHANGDTO;
import SQL.DataProvider;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author NGUYEN
 */
public class CTDONHANGDAO {
    
    public boolean xoactdonhangcoma(int ma)
    {
        DataProvider pro = new DataProvider();
        int kq;
        try
        {
            pro.open();
            String query = "DELETE FROM CT_DonHang WHERE MaDonHang = "+ ma;
            kq = pro.excuteupdate(query);
            if(kq>=0)
                return true;
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }   
        return false;
    }
}
